package com.yz.antlr.VisitorDemo;

/**
 * @author yanzhao
 * @version 1.0
 * TODO 菜单项
 * @date 2022/4/2 18:00
 */

public class Item extends Component {
    private String name;
    private float price;

    public Item(String name, float price) {
        this.name = name;
        this.price = price;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public float getPrice() {
        return price;
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }
}
